<!--# layout("/common/layout.html",{"jsBase":"/js/cms/enterprise/"}){ -->

<form class="layui-form" id="updateForm">
    <fieldset class="layui-elem-field">
        <legend>企业基本信息</legend>
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">统一社会信用代码<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="organizationCode" name="organizationCode" lay-verify="required" value="${enterprise.organizationCode}"   class="layui-input input-readonly" readonly>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">企业名称<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="enterpriseName" name="enterpriseName" lay-verify="required" value="${enterprise.enterpriseName}"   class="layui-input">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业详细通讯地址<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="postalAddress" name="postalAddress" lay-verify="required" value="${enterprise.postalAddress}"   class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">注册资金(万元)<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="registeredCapital" name="registeredCapital" lay-verify="required|number" value="${enterprise.registeredCapital}"   class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">注册资金币种<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="monetaryCurrencys"
                                                    id="monetaryCurrency" name="monetaryCurrency" lay-verify="required" value="${enterprise.monetaryCurrency}" layVerify="required" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">成立日期<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="dateEstablishment" name="dateEstablishment" lay-verify="required" value="${enterprise.dateEstablishment,"yyyy-MM-dd"}"   class="layui-input input-date" >
                        </div>
                    </div>
                    <!--
                    <div class="layui-inline">
                        <label class="layui-form-label">营业执照注册号</label>
                        <div class="layui-input-inline">
                            <input type="text" id="registrationNumber" name="registrationNumber"  value="${enterprise.registrationNumber}"   class="layui-input" >
                        </div>
                    </div>-->
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业手机号码<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="ephoneNumber" name="ephoneNumber" lay-verify="required" value="${enterprise.ephoneNumber}"   class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">企业法人<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="enterpriseLegalPerson" name="enterpriseLegalPerson" lay-verify="required" value=""   class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业联系电话<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="enterpriseTelephone" name="enterpriseTelephone" lay-verify="required" value="${enterprise.enterpriseTelephone}"   class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">企业邮箱<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="mail" name="mail"  value="${enterprise.mail}" lay-verify="required"  class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>

    <fieldset class="layui-elem-field">
        <legend>企业名录和额外信息</legend>
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业名录年度<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="enterpriseDirectory" name="enterpriseDirectory" lay-verify="required" value="${enterprise.enterpriseDirectory}"   class="layui-input input-readonly" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业名录类别<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="orgType"
                                                    id="directoryEnterprises" name="directoryEnterprises" lay-verify="required" value="${enterprise.directoryEnterprises}"   readonly="true"/>
                            <!--<input type="text" id="directoryEnterprises" name="directoryEnterprises"  value="${enterprise.directoryEnterprises}291219234"   class="layui-input input-readonly"readonly >-->
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">企业名额<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="businessQuota" name="businessQuota"  value="${enterprise.businessQuota}"   class="layui-input input-readonly" readonly>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>

    <fieldset class="layui-elem-field">
        <legend>企业联络信息</legend>
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业承办部门负责人<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="personCharge" name="personCharge"  value="${enterprise.personCharge}" lay-verify="required"  class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">企业承办部门负责人手机号码<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="phoneNumber" name="phoneNumber"  value="${enterprise.phoneNumber}" lay-verify="required"  class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">企业承办部门负责人联系电话<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="pcontactNumber" name="pcontactNumber"  value="${enterprise.pcontactNumber}" lay-verify="required"  class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">经办人手机号码<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="aphoneNumber" name="aphoneNumber"  value="${enterprise.aphoneNumber}" lay-verify="required"  class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">经办人<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input type="text" id="agent" name="agent"  value="${enterprise.agent}" lay-verify="required"  class="layui-input" >
                        </div>
                    </div>
                </div>
                <div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">经办人联系电话<span style="color: red">*</span></label>
                            <div class="layui-input-inline">
                                <input type="text" id="acontactNumber" name="acontactNumber"  value="${enterprise.acontactNumber}"  lay-verify="required" class="layui-input" >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>

    <div class="layui-row">
        <div class="layui-form-item">
        </div>
    </div>
    <input type="hidden" name="state" value=${enterprise.state} >
	<!-- 业务对象须有hidden字段，保存delFlag和version字段-->
    <input type="hidden" name="userId" value=${enterprise.userId} >
    <input type="hidden" name="delFlag" value=${enterprise.delFlag} >
    <input type="hidden" name="id" value=${enterprise.id} >
    <div class="layui-row" style="text-align: center;">
        <button class="layui-btn layui-btn-danger" type="button" lay-submit lay-filter="form">保存</button>
<!--
        <button class="layui-btn" type="button" onclick="exit()">取消</button>
-->
    </div></form>
<!--#} -->
<script>
    var form;
    layui.use(['edit', 'form'], function(){
        var enterpriseEdit = layui.edit
        enterpriseEdit.init();
        form = layui.form;

        form.on('submit(form)', function(){
            var callback = function(){
                // parent.window.dataReload();
                Common.info("企业信息填写成功");
                Lib.closeFrame();
                window.parent.location.reload();
            };
            Lib.submitForm("/cms/enterprise/initEdit.json",$('#updateForm'),{},callback);
        });
    });

    function exit(){
        window.parent.location.href = '/logout.do';
    }
</script>
